from typing import Optional

from pydantic import UUID4

from base.base_schemas import BaseEditSchema, BaseOutSchema, BaseFilterSchema


class GalleryCategoryOutSchema(BaseOutSchema):
    name: str


class GalleryCategoryEditSchema(BaseEditSchema):
    name: Optional[str] = None


class GalleryOutSchema(BaseOutSchema):
    title: str
    content: Optional[str] = None
    image: str
    image_hash: str
    category: GalleryCategoryOutSchema
    category_id: UUID4


class GalleryEditSchema(BaseEditSchema):
    title: Optional[str] = None
    content: Optional[str] = None
    image: Optional[str] = None
    image_hash: Optional[str] = None
    category_id: Optional[UUID4] = None


class GalleryFilters(BaseFilterSchema):
    title: Optional[str] = None
    content: Optional[str] = None
    category: Optional[UUID4] = None
